window.onload=function(){
    //tab切换
    $('.box').on('click','button',function(){
        if($(this).html()=="待使用"){
            $(this).attr('class',"open");
            $(this).next().attr('class',"");
            $('.movies1').css({'display':"block"});
            $('.movies2').css({'display':"none"});
        }
        else{
            $(this).attr('class',"open");
            $(this).prev().attr('class',"");
            $('.movies2').css({'display':"block"});
            $('.movies1').css({'display':"none"});
        }
    });

    $(".movies1").on('click','.ticket',function(){
        location.assign("../html/moviedetails.html");
        console.log($(this));
    });
}